﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/MasterPages/Blank.Master" AutoEventWireup="true" CodeBehind="EnumList.aspx.cs" Inherits="DMS.Web.Modules.SystemManagement.EnumList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="diy" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="server">
    选项值维护
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainHolder" runat="server">
    <script language="javascript" type="text/javascript">
        function OpenForm(action, id) {
            var sFeature = "dialogHeight:300px; dialogWidth:500px; center:yes; resizable:yes; scroll:no; status:no;";
            var url = "/Modules/SystemManagement/EnumForm.aspx?id=" + id + "&action=" + action;
            var result = window.showModalDialog(url, null, sFeature);
            if (result == "ok") {
                window.location.reload();
            }
        }

    </script>

    <div class="search">
            <!----------- 查询信息 ------------------>
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="form">
                        <table cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <th>选项类型：</th>
                                    <td>
                                        <asp:DropDownList ID="ddlEnumType" runat="server" DataTextField="EnumTypeName" DataValueField="EnumTypeID">
                                        </asp:DropDownList>
                                    </td>
                                <td class="button">
                                    <asp:LinkButton CssClass="linkbtn" ID="btnSearch"  OnClick="btnSearch_Click" runat="server"><span>查询</span></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton1" CssClass="linkbtn" OnClientClick="javascript:OpenForm('New', '');" runat="server"><span>新增</span></asp:LinkButton>
                                </td>
                            </tr>
                            
                        </table>
                    </td>
                </tr>
            </table>
        </div>

    <asp:GridView ID="gvList" runat="server" class="dg_borderstyle" AutoGenerateColumns="False"
        AlternatingRowStyle-CssClass="dg_alternatingitemstyle" 
        RowStyle-CssClass="dg_itemstyle" onrowcommand="gvList_RowCommand">
        <AlternatingRowStyle CssClass="dg_alternatingitemstyle"></AlternatingRowStyle>
        <Columns>
            <asp:BoundField DataField="EnumTypeName" HeaderText="选项类型" />
            <asp:BoundField DataField="EnumName" HeaderText="名称" />
            <asp:BoundField DataField="EnumCode" HeaderText="编码" />
            <asp:BoundField DataField="Sequence" HeaderText="序号" />

            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <a href="javascript:" onclick="javascript:OpenForm('Edit','<%#Eval("EnumID") %>')">打开</a>
                    <asp:LinkButton ID="btnDelete" runat="server" CommandName="Deactive" CommandArgument='<%#Eval("EnumID") %>'>删除</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            
        </Columns>
        <RowStyle CssClass="dg_itemstyle"></RowStyle>
    </asp:GridView>

    <div id="dvPager" class="PagerHolder">
            <diy:AspNetPager ID="pager" runat="server" AlwaysShow="true" OnPageChanged="pager_PageChanged"
                Width="100%" ShowPageIndexBox="Always" PageIndexBoxType="TextBox" TextBeforePageIndexBox="转到"
                TextAfterPageIndexBox="页" ShowCustomInfoSection="Left" CustomInfoHTML="总数：%RecordCount%，共 %PageCount% 页，当前为第%CurrentPageIndex%页"
                HorizontalAlign="right" FirstPageText="首页" PrevPageText="上页" NextPageText="下页"
                LastPageText="末页" CssClass="dg_pagestyle" PageSize="20">
            </diy:AspNetPager>
        </div>
</asp:Content>

